<template>
	<view class="main">
		<view class="sys-lst v-box">
			<view class="sys-item poser" @click="sendzhuxiao">
				注销账号
				<view class="sys-poser">
					<label><image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/contacts/right-jt.png"></image></label>
				</view>
			</view>
			<view class="sys-item poser" @click="sendout">
				退出登录
				<view class="sys-poser">
					<label><image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/contacts/right-jt.png"></image></label>
				</view>
			</view>
		</view>
		
		<pop ref="del" :direction="direction" :is_close="true" :is_mask="true" :width="90">
		     <view class="con-del dis-clm">
				 <view class="condel-ico"><image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/my/warn.svg"></image></view>
				 <view class="condel-text">确认退出？</view>
				 <view class="condel-btn condel-sure" @click="sureDel">退出</view>
				 <view class="condel-btn condel-con" @click="delCon">取消</view>
			 </view>
		</pop>
	</view>
</template>

<script>
import pop from "@/components/ming-pop/ming-blow.vue"	
import Index from "@/common/index-model.js"
let index = new Index()
let that = null	
export default {
	data() {
		return {
			direction:"center"
		}
	},
	components: {
		pop
	},
	methods: {
      sendout() {
		  this.$refs.del.show();
	  },
	  sureDel() {
		  uni.removeStorageSync('token')
		   uni.removeStorageSync('userid')
		  this.$refs.del.close();
		  // this.$WebIM.conn.close();
		  index.show_tips('退出登录成功')
		  setTimeout(()=>{
			uni.reLaunch({
			      url: '/pages/index/index'
			  });
		  },300)
	  },
	  delCon() {
		  this.$refs.del.close();
	  },
	  sendzhuxiao() {
		  index.redirectto("./systemZhuxiao")
	  }
	}
}		
</script>

<style>
@import url("@/static/css/publics.css");
@import url("@/static/css/systemSet.css");		
</style>